package com.ck.client.controller;

import com.alibaba.fastjson.JSON;
import com.ck.common.model.OperationResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
* @Description: test something
* @Author: hf
* @Date:    2018/10/24 9:26
* @Version: 1.0
*/
@Controller
public class TestController {
	private static Logger logger = LoggerFactory.getLogger(TestController.class);

	

	@ResponseBody
	@PostMapping(value = "/testParam")
	public OperationResult<Object> report(HttpServletRequest request) {
		logger.info( JSON.toJSONString(request.getParameterMap()));
		OperationResult<Object> objectOperationResult = OperationResult.newSuccessOperationResult();
		objectOperationResult.setData(JSON.toJSONString(request.getParameterMap()));
		return  objectOperationResult;
	}

}
